/*
 * channel.h
 *
 *  Created on: Aug 1, 2009
 *      Author: zaca
 */

#ifndef CHANNEL_H_
#define CHANNEL_H_

//#include <biosignal/montage/filter.h>
#include <biosignal/montage/channeldata.h>

#include <string>

namespace biosignal {
namespace montage {

struct Color {
	unsigned char R;
	unsigned char G;
	unsigned char B;
	unsigned char A;
};

class SignalInfo;
class Channel {
public:
	std::string label() const;
	Color color() const;
	virtual ~Channel();
	virtual ChannelDataType channel_data(const DataFrame* data_frame)=0;
	virtual double sampleRate() const=0;
protected:
	Color m_color;
	std::string m_label;
};

typedef shared_ptr<Channel> ChannelType;


class RefChannel: public Channel {
public:
	RefChannel(SourceSignal::SourceSignal_sptr source);
	virtual ChannelDataType channel_data(const DataFrame* data_frame);
	virtual double sampleRate() const;
private:
	SourceSignal::SourceSignal_sptr m_source;
};

class BipolarChannel : public Channel {
public:
	BipolarChannel(std::string source1, std::string source2);
	virtual ChannelDataType channel_data(const DataFrame* data_frame);
	virtual ~BipolarChannel();
	virtual double sampleRate() const;
	std::string source1() const;
	std::string source2() const;
private:
	std::string m_source1;
	std::string m_source2;
};

}
}

#endif /* CHANNEL_H_ */
